/*!
 _________
|    ⚽️   |\
| ~~~~~~~ |_\
| switch |
| ~~~~~~~ |
| ~~~~~~~ |
|_________|
*/
@import './_prefix.less';
@switch-fusion-blue-grey: #bdc7d2;
/* switchColor */
switch {
    color: var(--green);
    &[aria-checked="false"] {
        &::after {
            opacity: 0;
        }
        .wx-switch-input {
            background-color: @switch-fusion-blue-grey !important;
            border-color: @switch-fusion-blue-grey !important;
        }
    }
    &[checked] {
        .wx-switch-input {
            color: inherit !important;
            background-color: currentColor !important;;
            border-color: currentColor !important;;
        }
    }
    &[checked]::before,
    &.checked::before {
        transform: scale(0, 0);
    }
    .wx-switch-input {
        width: 96rpx !important;
        height: 54rpx !important;
        &::before {
            display: none;
        }
        // 中间小圆球
        &::after {
            margin: auto;
            width: 50rpx !important;
            height: 50rpx !important;
            left: 0;
            top: 0;
            bottom: 0;
            position: absolute;
            transform: scale(.9, .9);
            transition: all .1s ease-in-out 0s;
        }
    }
    &.radius {
        .wx-switch-input {
            border-radius: 10rpx;
            &::before,
            &::after {
                border-radius: 10rpx;
            }
            // 中间小圆球
            &::after {
                width: 50rpx !important;
                height: 50rpx !important;
            }
        }
    }
}
.switch {
    position: relative;
    &::before,
    &::after{
        font-family: '@{prefix}-icon';
        content: '\e759';
        position: absolute;
        color: var(--white) !important;
        top: 0%;
        right: auto;
        bottom: 0;
        left: 0;
        font-size: 16rpx;
        height: 52rpx;
        line-height: 52rpx;
        width: 50%;
        text-align: center;
        pointer-events: none;
        transform: scale(0, 0);
        transition: all .3s ease-in-out 0s;
        z-index: 9;
        margin: auto;
    }
    &::before {
        content: '\e75a';
        right: 12rpx;
        transform: scale(1, 1);
        left: auto;
    }
    &::after{
        content: '\e759';
        transform: scale(1, 1);
        font-size: 18rpx;
    }
}
/* 自定义 */
.switch-sex {
    &::before {
        content: '\e75b';
        font-size: 24rpx;
    }
    &::after {
        content: '\e75c';
        font-size: 24rpx;
    }
}
.switch-time {
    &::before {
        content: 'AM';
    }
    &::after {
        content: 'PM';
    }
}
.switch-phone {
    &::before {
        content: '\e686';
        font-size: 24rpx;
    }
    &::after {
        content: '\e688';
        font-size: 24rpx;
    }
}
.switch-on-off {
    &::before {
        content: 'OFF';
    }
    &::after {
        content: 'ON';
    }
}